Repository navigation
feat(profile): kit profile show|freeze|check command (Pillar 4 step 3) - #297
Merged
Merged
Conversation
Wires the profile schema (#295) + drift core (#296) into a CLI verb via COMMAND_REGISTRY (design: pillar4-traveling-profile-5.0.md). Adds src/commands/profile.ts: - show — render the declared profile with per-line reconciliation marks (✓/DRIFT/REMOVED/ ADDED), fingerprint, and an unaudited note for kinds not yet discoverable. - freeze — snapshot the DISCOVERED toolchain (skills/mcp via discoverAgentToolchain, vault store from .kit.toml) into .kit-profile.toml, PRESERVING operator-authored name/workflows/plugins/gates/scope verbatim. Deliberate action, like baseline freeze. - check — report declared-vs-discovered drift; --gate turns any drift into a non-zero exit for CI (default is warn/exit-0). Honest skip (exit 0) when no profile is declared. --json on every subcommand. Zero-LLM, deterministic; never auto-mutates the toolchain. Registry entry (experimental) + SUBCOMMAND_HELP; contracts/public-surface.json regenerated for the new verb. 7 command tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
|
✅ Docker image built successfully
|
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Step 3 of the versioned, traveling project profile (Pillar 4). Wires the schema (#295) and drift core (#296) into a first-class CLI verb via
COMMAND_REGISTRY, so the profile is now usable end-to-end. Zero-LLM, deterministic; never auto-mutates the toolchain.Type of Change
Related Issues
kit-research/docs/research/pillar4-traveling-profile-5.0.mdChanges Made
src/commands/profile.ts— three subcommands:show— render the declared profile with per-line reconciliation marks (✓ in sync/⚠ DRIFT/⚠ REMOVED/⚠ ADDED), fingerprint, and an explicit note for kinds not yet auditable.freeze— snapshot the discovered toolchain (skills/mcp viadiscoverAgentToolchain, vault store from.kit.toml) into.kit-profile.toml, preserving operator-authoredname/workflows/plugins/gates/scopeverbatim. A deliberate action, likekit baseline freeze.check— report declared-vs-discovered drift;--gateturns any drift into a non-zero exit for CI (default is warn / exit 0). Honest skip (exit 0) when no profile is declared.--jsonon every subcommand.src/cli.ts—profileregistry entry (experimental) +SUBCOMMAND_HELPfor show/freeze/check.contracts/public-surface.json— regenerated for the new verb (node scripts/gen-public-surface.mjs).src/commands/profile.test.ts— 7 tests (skip when no profile; freeze snapshots skills/mcp/vault; freeze preserves scope/workflows; check clean after freeze round-trip;--gateexits non-zero on drift; warn exits 0; unknown subcommand rejected).Testing
Test Coverage
public-surface.jsoncontract)npm test) — full suite 2640 pass / 0 fail (2633 baseline + 7)Manual Testing
npx tsc --noEmit→ clean.npx eslint src→ 0 errors (pre-existing complexity/max-lines warnings only;eslint srchas no--max-warnings).npm run build && node scripts/gen-public-surface.mjs && node scripts/test.mjs→ 2640 pass, 0 fail (public-surface contract test green).npx prettier --check→ formatted.Breaking Changes
None / N/A — new verb; nothing else changes behavior.
Checklist
npm test)Performance Impact
Reviewer Notes
Two deliberate design points: (1)
checkdefaults to warn (exit 0) and only gates with--gate— so adding the verb can't turn an existing CI red by surprise; net-new-drift gating (vs. this full-drift gate) is a later refinement noted in the design. (2)freezeis additive/preserving — it overwrites only the discoverable dimensions (skills/mcp/vault store) and copies operator-authored sections (workflows/plugins/scope/gates) through untouched, so a hand-written[scope]/RoE survives a re-freeze. Signing (.kit-profile.sig) and the plugin/workflow discovery that would make those kinds auditable are steps 4–5.🤖 Generated with Claude Code
https://claude.ai/code/session_01DbF4MFePXWNCd4dxBQvqH2
Generated by Claude Code